#include <httplib.h>
#include <iostream>
#include <regex>
#include <string>
#include <nlohmann/json.hpp>
int main()
{
    httplib::Client cli("host.gymparty.net", 81);
    // cli.set_timeout_sec(5);
    cli.enable_server_certificate_verification(false);

    cli.set_follow_location(true);

    httplib::Headers headers = {
        {"User-Agent", "MyHttpsClient/1.0"},
        {"Accept", "application/json"},
    };

    std::string path = "/Vein/SCHWebService.asmx/CheckIn";
    httplib::Params params = {
        {"BrandCode", "Anke2101"},
        {"ClubID", "d10b9250-25fe-4a99-b320-7b56aa5c12b4"},
        {"ContractID", "3fc2f301-d0f5-4eb7-80f9-3af74bb4795a"},
        {"Mobile", "13100000000"},
        {"IdentityType", "2"},
        {"DeviceName", "闸机入场安科测试三店"},
        {"Key", "feb5f95bdcbabc1686150719f6048d83"}};
    auto res = cli.Post(path, headers, params);
    if (res)
    {
        std::cout << "POST 状态码: " << res->status << std::endl;
        std::cout << "POST 响应体: " << res->body << std::endl;
    }
    else
    {
        // std::cout << "POST 错误" << std::endl;
    }

}